﻿///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 3.5
// Code is generated on: Monday, December 17, 2012 11:21:49 AM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Data;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace WHMS.DatabaseSpecific
{
	/// <summary>Singleton implementation of the PersistenceInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.</summary>
	/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the PersistenceInfoProviderBase class is threadsafe.</remarks>
	internal static class PersistenceInfoProviderSingleton
	{
		#region Class Member Declarations
		private static readonly IPersistenceInfoProvider _providerInstance = new PersistenceInfoProviderCore();
		#endregion

		/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
		static PersistenceInfoProviderSingleton()
		{
		}

		/// <summary>Gets the singleton instance of the PersistenceInfoProviderCore</summary>
		/// <returns>Instance of the PersistenceInfoProvider.</returns>
		public static IPersistenceInfoProvider GetInstance()
		{
			return _providerInstance;
		}
	}

	/// <summary>Actual implementation of the PersistenceInfoProvider. Used by singleton wrapper.</summary>
	internal class PersistenceInfoProviderCore : PersistenceInfoProviderBase
	{
		/// <summary>Initializes a new instance of the <see cref="PersistenceInfoProviderCore"/> class.</summary>
		internal PersistenceInfoProviderCore()
		{
			Init();
		}

		/// <summary>Method which initializes the internal datastores with the structure of hierarchical types.</summary>
		private void Init()
		{
			this.InitClass((39 + 2));
			InitContractorEntityMappings();
			InitCurrencyEntityMappings();
			InitDepositTransactionEntityMappings();
			InitDepositTypeEntityMappings();
			InitInitialBalanceEntityMappings();
			InitInspectionTypeEntityMappings();
			InitInventoryEntityMappings();
			InitInventoryItemEntityMappings();
			InitItemEntityMappings();
			InitItemSupplierEntityMappings();
			InitItemTypeEntityMappings();
			InitProjectEntityMappings();
			InitProjectContractorEntityMappings();
			InitProjectItemPlanEntityMappings();
			InitRetrievalTransactionEntityMappings();
			InitRoleEntityMappings();
			InitShelfEntityMappings();
			InitShelfTypeEntityMappings();
			InitStoreEntityMappings();
			InitStorekeeperEntityMappings();
			InitStoreShelfBalanceEntityMappings();
			InitSupplierEntityMappings();
			InitSupplyOrderEntityMappings();
			InitSupplyOrderItemEntityMappings();
			InitTransactionEntityMappings();
			InitTransactionItemEntityMappings();
			InitTransferRequestEntityMappings();
			InitTransferRequestItemEntityMappings();
			InitTransferTransactionEntityMappings();
			InitUnitEntityMappings();
			InitUnitConverterEntityMappings();
			InitUnitTypeEntityMappings();
			InitUserEntityMappings();
			InitUserRoleEntityMappings();
			InitWithdrawalTypeEntityMappings();
			InitWithdrawRequestEntityMappings();
			InitWithdrawRequestItemEntityMappings();
			InitWithdrawTransactionEntityMappings();
			InitWithdrawzPartyEntityMappings();
			InitItemViewTypedViewMappings();
			InitLookupTypedViewMappings();
		}


		/// <summary>Inits ContractorEntity's mappings</summary>
		private void InitContractorEntityMappings()
		{
			this.AddElementMapping( "ContractorEntity", @"WHMS", @"dbo", "Contractor", 8 );
			this.AddElementFieldMapping( "ContractorEntity", "AccountingNumber", "AccountingNumber", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 0 );
			this.AddElementFieldMapping( "ContractorEntity", "Address", "Address", true, "NVarChar", 200, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "ContractorEntity", "Code", "Code", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 2 );
			this.AddElementFieldMapping( "ContractorEntity", "ContactPerson", "ContactPerson", true, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 3 );
			this.AddElementFieldMapping( "ContractorEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 4 );
			this.AddElementFieldMapping( "ContractorEntity", "Name", "Name", false, "NVarChar", 100, 0, 0, false, "", null, typeof(System.String), 5 );
			this.AddElementFieldMapping( "ContractorEntity", "PhoneNumber", "PhoneNumber", true, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 6 );
			this.AddElementFieldMapping( "ContractorEntity", "WithdrawzPartyId", "WithdrawzPartyId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 7 );
		}
		/// <summary>Inits CurrencyEntity's mappings</summary>
		private void InitCurrencyEntityMappings()
		{
			this.AddElementMapping( "CurrencyEntity", @"WHMS", @"dbo", "Currency", 3 );
			this.AddElementFieldMapping( "CurrencyEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "CurrencyEntity", "Name", "Name", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "CurrencyEntity", "Order", "Order", false, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 2 );
		}
		/// <summary>Inits DepositTransactionEntity's mappings</summary>
		private void InitDepositTransactionEntityMappings()
		{
			this.AddElementMapping( "DepositTransactionEntity", @"WHMS", @"dbo", "DepositTransaction", 18 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "BillOfLadingNmber", "BillOfLadingNmber", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 0 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "DepositTypeId", "DepositTypeId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "DriverName", "DriverName", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 2 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "ExamDate", "ExamDate", true, "SmallDateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 3 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "ExamRecordNumber", "ExamRecordNumber", true, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 4 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 5 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "InspectionTypeId", "InspectionTypeId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 6 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "IsCoded", "IsCoded", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 7 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "IsPriced", "IsPriced", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 8 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "PlateNumber", "PlateNumber", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 9 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "Ponumber", "PONumber", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 10 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "Prnumber", "PRNumber", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 11 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "Status", "Status", true, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 12 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "SupplierId", "SupplierId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 13 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "SupplyOrderNumber", "SupplyOrderNumber", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 14 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "TransactionId", "TransactionId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 15 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "TransactionStatus", "TransactionStatus", true, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 16 );
			this.AddElementFieldMapping( "DepositTransactionEntity", "Type", "Type", true, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 17 );
		}
		/// <summary>Inits DepositTypeEntity's mappings</summary>
		private void InitDepositTypeEntityMappings()
		{
			this.AddElementMapping( "DepositTypeEntity", @"WHMS", @"dbo", "DepositType", 3 );
			this.AddElementFieldMapping( "DepositTypeEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "DepositTypeEntity", "Name", "Name", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "DepositTypeEntity", "Order", "Order", false, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 2 );
		}
		/// <summary>Inits InitialBalanceEntity's mappings</summary>
		private void InitInitialBalanceEntityMappings()
		{
			this.AddElementMapping( "InitialBalanceEntity", @"WHMS", @"dbo", "InitialBalance", 8 );
			this.AddElementFieldMapping( "InitialBalanceEntity", "Balance", "Balance", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 0 );
			this.AddElementFieldMapping( "InitialBalanceEntity", "CurrentBalance", "CurrentBalance", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 1 );
			this.AddElementFieldMapping( "InitialBalanceEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "InitialBalanceEntity", "ItemId", "ItemId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 3 );
			this.AddElementFieldMapping( "InitialBalanceEntity", "ProjectId", "ProjectId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 4 );
			this.AddElementFieldMapping( "InitialBalanceEntity", "ShelfId", "ShelfId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 5 );
			this.AddElementFieldMapping( "InitialBalanceEntity", "StoreId", "StoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 6 );
			this.AddElementFieldMapping( "InitialBalanceEntity", "UnitPrice", "UnitPrice", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 7 );
		}
		/// <summary>Inits InspectionTypeEntity's mappings</summary>
		private void InitInspectionTypeEntityMappings()
		{
			this.AddElementMapping( "InspectionTypeEntity", @"WHMS", @"dbo", "InspectionType", 3 );
			this.AddElementFieldMapping( "InspectionTypeEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "InspectionTypeEntity", "Name", "Name", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "InspectionTypeEntity", "Order", "Order", false, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 2 );
		}
		/// <summary>Inits InventoryEntity's mappings</summary>
		private void InitInventoryEntityMappings()
		{
			this.AddElementMapping( "InventoryEntity", @"WHMS", @"dbo", "Inventory", 3 );
			this.AddElementFieldMapping( "InventoryEntity", "CountDate", "CountDate", false, "SmallDateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 0 );
			this.AddElementFieldMapping( "InventoryEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "InventoryEntity", "StoreId", "StoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
		}
		/// <summary>Inits InventoryItemEntity's mappings</summary>
		private void InitInventoryItemEntityMappings()
		{
			this.AddElementMapping( "InventoryItemEntity", @"WHMS", @"dbo", "InventoryItem", 8 );
			this.AddElementFieldMapping( "InventoryItemEntity", "Comment", "Comment", true, "NVarChar", 300, 0, 0, false, "", null, typeof(System.String), 0 );
			this.AddElementFieldMapping( "InventoryItemEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "InventoryItemEntity", "InventoryId", "InventoryId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "InventoryItemEntity", "ItemId", "ItemId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 3 );
			this.AddElementFieldMapping( "InventoryItemEntity", "QuantityCounted", "QuantityCounted", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 4 );
			this.AddElementFieldMapping( "InventoryItemEntity", "Quantitystored", "Quantitystored", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 5 );
			this.AddElementFieldMapping( "InventoryItemEntity", "Result", "Result", true, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 6 );
			this.AddElementFieldMapping( "InventoryItemEntity", "ShelfId", "ShelfId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 7 );
		}
		/// <summary>Inits ItemEntity's mappings</summary>
		private void InitItemEntityMappings()
		{
			this.AddElementMapping( "ItemEntity", @"WHMS", @"dbo", "Item", 14 );
			this.AddElementFieldMapping( "ItemEntity", "BarCode", "BarCode", true, "VarChar", 2147483647, 0, 0, false, "", null, typeof(System.String), 0 );
			this.AddElementFieldMapping( "ItemEntity", "Code", "Code", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "ItemEntity", "Description", "Description", true, "NVarChar", 300, 0, 0, false, "", null, typeof(System.String), 2 );
			this.AddElementFieldMapping( "ItemEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 3 );
			this.AddElementFieldMapping( "ItemEntity", "Name", "Name", false, "NVarChar", 100, 0, 0, false, "", null, typeof(System.String), 4 );
			this.AddElementFieldMapping( "ItemEntity", "OriginalBarCode", "OriginalBarCode", true, "VarChar", 2147483647, 0, 0, false, "", null, typeof(System.String), 5 );
			this.AddElementFieldMapping( "ItemEntity", "Type", "Type", true, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 6 );
			this.AddElementFieldMapping( "ItemEntity", "TypeId", "TypeId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 7 );
			this.AddElementFieldMapping( "ItemEntity", "Unit", "Unit", true, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 8 );
			this.AddElementFieldMapping( "ItemEntity", "UnitId", "UnitId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 9 );
			this.AddElementFieldMapping( "ItemEntity", "UnitType", "UnitType", true, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 10 );
			this.AddElementFieldMapping( "ItemEntity", "UnitTypeId", "UnitTypeId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 11 );
			this.AddElementFieldMapping( "ItemEntity", "Volume", "Volume", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 12 );
			this.AddElementFieldMapping( "ItemEntity", "Weight", "Weight", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 13 );
		}
		/// <summary>Inits ItemSupplierEntity's mappings</summary>
		private void InitItemSupplierEntityMappings()
		{
			this.AddElementMapping( "ItemSupplierEntity", @"WHMS", @"dbo", "ItemSupplier", 3 );
			this.AddElementFieldMapping( "ItemSupplierEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "ItemSupplierEntity", "ItemId", "ItemId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "ItemSupplierEntity", "SupplierId", "SupplierId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
		}
		/// <summary>Inits ItemTypeEntity's mappings</summary>
		private void InitItemTypeEntityMappings()
		{
			this.AddElementMapping( "ItemTypeEntity", @"WHMS", @"dbo", "ItemType", 3 );
			this.AddElementFieldMapping( "ItemTypeEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "ItemTypeEntity", "Name", "Name", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "ItemTypeEntity", "Order", "Order", false, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 2 );
		}
		/// <summary>Inits ProjectEntity's mappings</summary>
		private void InitProjectEntityMappings()
		{
			this.AddElementMapping( "ProjectEntity", @"WHMS", @"dbo", "Project", 11 );
			this.AddElementFieldMapping( "ProjectEntity", "ActualEndDate", "ActualEndDate", true, "SmallDateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 0 );
			this.AddElementFieldMapping( "ProjectEntity", "ActualStartDate", "ActualStartDate", true, "SmallDateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 1 );
			this.AddElementFieldMapping( "ProjectEntity", "Code", "Code", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 2 );
			this.AddElementFieldMapping( "ProjectEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 3 );
			this.AddElementFieldMapping( "ProjectEntity", "IsGeneral", "IsGeneral", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 4 );
			this.AddElementFieldMapping( "ProjectEntity", "Manager", "Manager", true, "NVarChar", 100, 0, 0, false, "", null, typeof(System.String), 5 );
			this.AddElementFieldMapping( "ProjectEntity", "ManagerId", "ManagerId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 6 );
			this.AddElementFieldMapping( "ProjectEntity", "Name", "Name", false, "NVarChar", 100, 0, 0, false, "", null, typeof(System.String), 7 );
			this.AddElementFieldMapping( "ProjectEntity", "PlannedEndDate", "PlannedEndDate", true, "SmallDateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 8 );
			this.AddElementFieldMapping( "ProjectEntity", "PlannedStartDate", "PlannedStartDate", true, "SmallDateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 9 );
			this.AddElementFieldMapping( "ProjectEntity", "Status", "Status", true, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 10 );
		}
		/// <summary>Inits ProjectContractorEntity's mappings</summary>
		private void InitProjectContractorEntityMappings()
		{
			this.AddElementMapping( "ProjectContractorEntity", @"WHMS", @"dbo", "ProjectContractor", 3 );
			this.AddElementFieldMapping( "ProjectContractorEntity", "ContractorId", "ContractorId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "ProjectContractorEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "ProjectContractorEntity", "ProjectId", "ProjectId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
		}
		/// <summary>Inits ProjectItemPlanEntity's mappings</summary>
		private void InitProjectItemPlanEntityMappings()
		{
			this.AddElementMapping( "ProjectItemPlanEntity", @"WHMS", @"dbo", "ProjectItemPlan", 5 );
			this.AddElementFieldMapping( "ProjectItemPlanEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "ProjectItemPlanEntity", "ItemId", "ItemId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "ProjectItemPlanEntity", "ProjectId", "ProjectId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "ProjectItemPlanEntity", "Quantity", "Quantity", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 3 );
			this.AddElementFieldMapping( "ProjectItemPlanEntity", "Unit", "Unit", false, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 4 );
		}
		/// <summary>Inits RetrievalTransactionEntity's mappings</summary>
		private void InitRetrievalTransactionEntityMappings()
		{
			this.AddElementMapping( "RetrievalTransactionEntity", @"WHMS", @"dbo", "RetrievalTransaction", 5 );
			this.AddElementFieldMapping( "RetrievalTransactionEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "RetrievalTransactionEntity", "Recipient", "Recipient", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "RetrievalTransactionEntity", "TransactionId", "TransactionId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "RetrievalTransactionEntity", "TransactionStatus", "TransactionStatus", false, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 3 );
			this.AddElementFieldMapping( "RetrievalTransactionEntity", "WithdrawTransactionId", "WithdrawTransactionID", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 4 );
		}
		/// <summary>Inits RoleEntity's mappings</summary>
		private void InitRoleEntityMappings()
		{
			this.AddElementMapping( "RoleEntity", @"WHMS", @"dbo", "Role", 16 );
			this.AddElementFieldMapping( "RoleEntity", "CanAddBcode", "CanAddBCode", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 0 );
			this.AddElementFieldMapping( "RoleEntity", "CanAddContractor", "CanAddContractor", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 1 );
			this.AddElementFieldMapping( "RoleEntity", "CanAddItem", "CanAddItem", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 2 );
			this.AddElementFieldMapping( "RoleEntity", "CanAddPrice", "CanAddPrice", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 3 );
			this.AddElementFieldMapping( "RoleEntity", "CanAddProject", "CanAddProject", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 4 );
			this.AddElementFieldMapping( "RoleEntity", "CanAddRole", "CanAddRole", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 5 );
			this.AddElementFieldMapping( "RoleEntity", "CanAddStore", "CanAddStore", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 6 );
			this.AddElementFieldMapping( "RoleEntity", "CanAddSupplier", "CanAddSupplier", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 7 );
			this.AddElementFieldMapping( "RoleEntity", "CanAddUser", "CanAddUser", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 8 );
			this.AddElementFieldMapping( "RoleEntity", "CanAudit", "CanAudit", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 9 );
			this.AddElementFieldMapping( "RoleEntity", "CanUseHandHeld", "CanUseHandHeld", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 10 );
			this.AddElementFieldMapping( "RoleEntity", "Code", "Code", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 11 );
			this.AddElementFieldMapping( "RoleEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 12 );
			this.AddElementFieldMapping( "RoleEntity", "Name", "Name", false, "NVarChar", 100, 0, 0, false, "", null, typeof(System.String), 13 );
			this.AddElementFieldMapping( "RoleEntity", "Viewreports", "Viewreports", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 14 );
			this.AddElementFieldMapping( "RoleEntity", "ViewWorkshop", "ViewWorkshop", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 15 );
		}
		/// <summary>Inits ShelfEntity's mappings</summary>
		private void InitShelfEntityMappings()
		{
			this.AddElementMapping( "ShelfEntity", @"WHMS", @"dbo", "Shelf", 8 );
			this.AddElementFieldMapping( "ShelfEntity", "BarCode", "BarCode", true, "VarChar", 2147483647, 0, 0, false, "", null, typeof(System.String), 0 );
			this.AddElementFieldMapping( "ShelfEntity", "Code", "Code", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "ShelfEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "ShelfEntity", "OriginalBarCode", "OriginalBarCode", true, "VarChar", 2147483647, 0, 0, false, "", null, typeof(System.String), 3 );
			this.AddElementFieldMapping( "ShelfEntity", "Size", "Size", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 4 );
			this.AddElementFieldMapping( "ShelfEntity", "StoreId", "StoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 5 );
			this.AddElementFieldMapping( "ShelfEntity", "Type", "Type", true, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 6 );
			this.AddElementFieldMapping( "ShelfEntity", "TypeId", "TypeId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 7 );
		}
		/// <summary>Inits ShelfTypeEntity's mappings</summary>
		private void InitShelfTypeEntityMappings()
		{
			this.AddElementMapping( "ShelfTypeEntity", @"WHMS", @"dbo", "ShelfType", 3 );
			this.AddElementFieldMapping( "ShelfTypeEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "ShelfTypeEntity", "Name", "Name", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "ShelfTypeEntity", "Order", "Order", false, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 2 );
		}
		/// <summary>Inits StoreEntity's mappings</summary>
		private void InitStoreEntityMappings()
		{
			this.AddElementMapping( "StoreEntity", @"WHMS", @"dbo", "Store", 9 );
			this.AddElementFieldMapping( "StoreEntity", "Code", "Code", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 0 );
			this.AddElementFieldMapping( "StoreEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "StoreEntity", "IsPrimary", "IsPrimary", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 2 );
			this.AddElementFieldMapping( "StoreEntity", "Name", "Name", false, "NVarChar", 100, 0, 0, false, "", null, typeof(System.String), 3 );
			this.AddElementFieldMapping( "StoreEntity", "OccupancyRate", "OccupancyRate", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 4 );
			this.AddElementFieldMapping( "StoreEntity", "ParentStoreId", "ParentStoreId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 5 );
			this.AddElementFieldMapping( "StoreEntity", "ProjectId", "ProjectId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 6 );
			this.AddElementFieldMapping( "StoreEntity", "TotalSize", "TotalSize", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 7 );
			this.AddElementFieldMapping( "StoreEntity", "Type", "Type", true, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 8 );
		}
		/// <summary>Inits StorekeeperEntity's mappings</summary>
		private void InitStorekeeperEntityMappings()
		{
			this.AddElementMapping( "StorekeeperEntity", @"WHMS", @"dbo", "Storekeeper", 3 );
			this.AddElementFieldMapping( "StorekeeperEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "StorekeeperEntity", "KeeperId", "KeeperID", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "StorekeeperEntity", "StoreId", "StoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
		}
		/// <summary>Inits StoreShelfBalanceEntity's mappings</summary>
		private void InitStoreShelfBalanceEntityMappings()
		{
			this.AddElementMapping( "StoreShelfBalanceEntity", @"WHMS", @"dbo", "StoreShelfBalance", 7 );
			this.AddElementFieldMapping( "StoreShelfBalanceEntity", "Balance", "Balance", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 0 );
			this.AddElementFieldMapping( "StoreShelfBalanceEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "StoreShelfBalanceEntity", "ItemId", "ItemId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "StoreShelfBalanceEntity", "ProjectId", "ProjectId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 3 );
			this.AddElementFieldMapping( "StoreShelfBalanceEntity", "ShelfId", "ShelfId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 4 );
			this.AddElementFieldMapping( "StoreShelfBalanceEntity", "StoreId", "StoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 5 );
			this.AddElementFieldMapping( "StoreShelfBalanceEntity", "UnitPrice", "UnitPrice", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 6 );
		}
		/// <summary>Inits SupplierEntity's mappings</summary>
		private void InitSupplierEntityMappings()
		{
			this.AddElementMapping( "SupplierEntity", @"WHMS", @"dbo", "Supplier", 7 );
			this.AddElementFieldMapping( "SupplierEntity", "AccountingNumber", "AccountingNumber", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 0 );
			this.AddElementFieldMapping( "SupplierEntity", "Address", "Address", true, "NVarChar", 200, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "SupplierEntity", "Code", "Code", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 2 );
			this.AddElementFieldMapping( "SupplierEntity", "ContactPerson", "ContactPerson", true, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 3 );
			this.AddElementFieldMapping( "SupplierEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 4 );
			this.AddElementFieldMapping( "SupplierEntity", "Name", "Name", false, "NVarChar", 100, 0, 0, false, "", null, typeof(System.String), 5 );
			this.AddElementFieldMapping( "SupplierEntity", "PhoneNumber", "PhoneNumber", true, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 6 );
		}
		/// <summary>Inits SupplyOrderEntity's mappings</summary>
		private void InitSupplyOrderEntityMappings()
		{
			this.AddElementMapping( "SupplyOrderEntity", @"WHMS", @"dbo", "SupplyOrder", 17 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "AdditionalDiscount", "AdditionalDiscount", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 0 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "Comment", "Comment", true, "NVarChar", 500, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "CreatedBy", "CreatedBy", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "CreatedOn", "CreatedOn", false, "DateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 3 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "CurrencyId", "CurrencyId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 4 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "CurrencyRate", "CurrencyRate", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 5 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "Date", "Date", false, "DateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 6 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "DiscountPercentage", "DiscountPercentage", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 7 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 8 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "InsuranceCost", "InsuranceCost", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 9 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "IsProcessed", "IsProcessed", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 10 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "OtherCosts", "OtherCosts", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 11 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "ProjectId", "ProjectId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 12 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "ShippingCost", "ShippingCost", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 13 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "SupplierId", "SupplierId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 14 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "SupplyOrderNumber", "SupplyOrderNumber", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 15 );
			this.AddElementFieldMapping( "SupplyOrderEntity", "TotalCost", "TotalCost", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 16 );
		}
		/// <summary>Inits SupplyOrderItemEntity's mappings</summary>
		private void InitSupplyOrderItemEntityMappings()
		{
			this.AddElementMapping( "SupplyOrderItemEntity", @"WHMS", @"dbo", "SupplyOrderItem", 9 );
			this.AddElementFieldMapping( "SupplyOrderItemEntity", "DeliveredQuantity", "DeliveredQuantity", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 0 );
			this.AddElementFieldMapping( "SupplyOrderItemEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "SupplyOrderItemEntity", "ItemId", "ItemId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "SupplyOrderItemEntity", "LastDeliveryDate", "LastDeliveryDate", true, "DateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 3 );
			this.AddElementFieldMapping( "SupplyOrderItemEntity", "Quantity", "Quantity", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 4 );
			this.AddElementFieldMapping( "SupplyOrderItemEntity", "SupplyOrderId", "SupplyOrderId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 5 );
			this.AddElementFieldMapping( "SupplyOrderItemEntity", "UnitCost", "UnitCost", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 6 );
			this.AddElementFieldMapping( "SupplyOrderItemEntity", "UnitDiscount", "UnitDiscount", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 7 );
			this.AddElementFieldMapping( "SupplyOrderItemEntity", "UnitPrice", "UnitPrice", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 8 );
		}
		/// <summary>Inits TransactionEntity's mappings</summary>
		private void InitTransactionEntityMappings()
		{
			this.AddElementMapping( "TransactionEntity", @"WHMS", @"dbo", "Transaction", 8 );
			this.AddElementFieldMapping( "TransactionEntity", "CreatedBy", "CreatedBy", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "TransactionEntity", "CreatedOn", "CreatedOn", false, "SmallDateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 1 );
			this.AddElementFieldMapping( "TransactionEntity", "Date", "Date", false, "SmallDateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 2 );
			this.AddElementFieldMapping( "TransactionEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 3 );
			this.AddElementFieldMapping( "TransactionEntity", "PermitNumber", "PermitNumber", true, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 4 );
			this.AddElementFieldMapping( "TransactionEntity", "ProjectId", "ProjectId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 5 );
			this.AddElementFieldMapping( "TransactionEntity", "StoreId", "StoreId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 6 );
			this.AddElementFieldMapping( "TransactionEntity", "Type", "Type", false, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 7 );
		}
		/// <summary>Inits TransactionItemEntity's mappings</summary>
		private void InitTransactionItemEntityMappings()
		{
			this.AddElementMapping( "TransactionItemEntity", @"WHMS", @"dbo", "TransactionItem", 14 );
			this.AddElementFieldMapping( "TransactionItemEntity", "CurrentBalance", "CurrentBalance", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 0 );
			this.AddElementFieldMapping( "TransactionItemEntity", "Expenses", "Expenses", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 1 );
			this.AddElementFieldMapping( "TransactionItemEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "TransactionItemEntity", "ItemId", "ItemId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 3 );
			this.AddElementFieldMapping( "TransactionItemEntity", "LaborCost", "LaborCost", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 4 );
			this.AddElementFieldMapping( "TransactionItemEntity", "MoveType", "MoveType", true, "Char", 2, 0, 0, false, "", null, typeof(System.String), 5 );
			this.AddElementFieldMapping( "TransactionItemEntity", "Quantity", "Quantity", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 6 );
			this.AddElementFieldMapping( "TransactionItemEntity", "RequestItemId", "RequestItemId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 7 );
			this.AddElementFieldMapping( "TransactionItemEntity", "SellingPrice", "SellingPrice", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 8 );
			this.AddElementFieldMapping( "TransactionItemEntity", "ShelfId", "ShelfId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 9 );
			this.AddElementFieldMapping( "TransactionItemEntity", "StoreId", "StoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 10 );
			this.AddElementFieldMapping( "TransactionItemEntity", "TransactionId", "TransactionId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 11 );
			this.AddElementFieldMapping( "TransactionItemEntity", "Unit", "Unit", false, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 12 );
			this.AddElementFieldMapping( "TransactionItemEntity", "UnitPrice", "UnitPrice", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 13 );
		}
		/// <summary>Inits TransferRequestEntity's mappings</summary>
		private void InitTransferRequestEntityMappings()
		{
			this.AddElementMapping( "TransferRequestEntity", @"WHMS", @"dbo", "TransferRequest", 10 );
			this.AddElementFieldMapping( "TransferRequestEntity", "CreatedBy", "CreatedBy", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "TransferRequestEntity", "CreatedOn", "CreatedOn", false, "DateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 1 );
			this.AddElementFieldMapping( "TransferRequestEntity", "Date", "Date", false, "DateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 2 );
			this.AddElementFieldMapping( "TransferRequestEntity", "FromStoreId", "FromStoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 3 );
			this.AddElementFieldMapping( "TransferRequestEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 4 );
			this.AddElementFieldMapping( "TransferRequestEntity", "IsProcessed", "IsProcessed", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 5 );
			this.AddElementFieldMapping( "TransferRequestEntity", "ProjectId", "ProjectId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 6 );
			this.AddElementFieldMapping( "TransferRequestEntity", "RequestNumber", "RequestNumber", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 7 );
			this.AddElementFieldMapping( "TransferRequestEntity", "ToProjectId", "ToProjectId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 8 );
			this.AddElementFieldMapping( "TransferRequestEntity", "ToStoreId", "ToStoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 9 );
		}
		/// <summary>Inits TransferRequestItemEntity's mappings</summary>
		private void InitTransferRequestItemEntityMappings()
		{
			this.AddElementMapping( "TransferRequestItemEntity", @"WHMS", @"dbo", "TransferRequestItem", 7 );
			this.AddElementFieldMapping( "TransferRequestItemEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "TransferRequestItemEntity", "ItemId", "ItemId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "TransferRequestItemEntity", "LastDeliveryDate", "LastDeliveryDate", true, "DateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 2 );
			this.AddElementFieldMapping( "TransferRequestItemEntity", "Quantity", "Quantity", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 3 );
			this.AddElementFieldMapping( "TransferRequestItemEntity", "SellingPrice", "SellingPrice", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 4 );
			this.AddElementFieldMapping( "TransferRequestItemEntity", "TransferRequestId", "TransferRequestId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 5 );
			this.AddElementFieldMapping( "TransferRequestItemEntity", "WithdawedQuantity", "WithdawedQuantity", true, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 6 );
		}
		/// <summary>Inits TransferTransactionEntity's mappings</summary>
		private void InitTransferTransactionEntityMappings()
		{
			this.AddElementMapping( "TransferTransactionEntity", @"WHMS", @"dbo", "TransferTransaction", 5 );
			this.AddElementFieldMapping( "TransferTransactionEntity", "FromStoreId", "FromStoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "TransferTransactionEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "TransferTransactionEntity", "ToStoreId", "ToStoreId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "TransferTransactionEntity", "TransactionId", "TransactionId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 3 );
			this.AddElementFieldMapping( "TransferTransactionEntity", "Type", "Type", false, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 4 );
		}
		/// <summary>Inits UnitEntity's mappings</summary>
		private void InitUnitEntityMappings()
		{
			this.AddElementMapping( "UnitEntity", @"WHMS", @"dbo", "Unit", 3 );
			this.AddElementFieldMapping( "UnitEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "UnitEntity", "Name", "Name", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "UnitEntity", "Order", "Order", false, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 2 );
		}
		/// <summary>Inits UnitConverterEntity's mappings</summary>
		private void InitUnitConverterEntityMappings()
		{
			this.AddElementMapping( "UnitConverterEntity", @"WHMS", @"dbo", "UnitConverter", 4 );
			this.AddElementFieldMapping( "UnitConverterEntity", "FromUnitId", "FromUnitId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "UnitConverterEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "UnitConverterEntity", "Rate", "Rate", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 2 );
			this.AddElementFieldMapping( "UnitConverterEntity", "ToUnitId", "ToUnitId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 3 );
		}
		/// <summary>Inits UnitTypeEntity's mappings</summary>
		private void InitUnitTypeEntityMappings()
		{
			this.AddElementMapping( "UnitTypeEntity", @"WHMS", @"dbo", "UnitType", 3 );
			this.AddElementFieldMapping( "UnitTypeEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "UnitTypeEntity", "Name", "Name", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "UnitTypeEntity", "Order", "Order", false, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 2 );
		}
		/// <summary>Inits UserEntity's mappings</summary>
		private void InitUserEntityMappings()
		{
			this.AddElementMapping( "UserEntity", @"WHMS", @"dbo", "User", 7 );
			this.AddElementFieldMapping( "UserEntity", "Code", "Code", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 0 );
			this.AddElementFieldMapping( "UserEntity", "Email", "Email", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "UserEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "UserEntity", "Name", "Name", false, "NVarChar", 100, 0, 0, false, "", null, typeof(System.String), 3 );
			this.AddElementFieldMapping( "UserEntity", "Password", "Password", true, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 4 );
			this.AddElementFieldMapping( "UserEntity", "Salt", "Salt", true, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 5 );
			this.AddElementFieldMapping( "UserEntity", "UserName", "UserName", false, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 6 );
		}
		/// <summary>Inits UserRoleEntity's mappings</summary>
		private void InitUserRoleEntityMappings()
		{
			this.AddElementMapping( "UserRoleEntity", @"WHMS", @"dbo", "UserRole", 3 );
			this.AddElementFieldMapping( "UserRoleEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "UserRoleEntity", "RoleId", "RoleID", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "UserRoleEntity", "UserId", "UserId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
		}
		/// <summary>Inits WithdrawalTypeEntity's mappings</summary>
		private void InitWithdrawalTypeEntityMappings()
		{
			this.AddElementMapping( "WithdrawalTypeEntity", @"WHMS", @"dbo", "WithdrawalType", 3 );
			this.AddElementFieldMapping( "WithdrawalTypeEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "WithdrawalTypeEntity", "Name", "Name", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "WithdrawalTypeEntity", "Order", "Order", false, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 2 );
		}
		/// <summary>Inits WithdrawRequestEntity's mappings</summary>
		private void InitWithdrawRequestEntityMappings()
		{
			this.AddElementMapping( "WithdrawRequestEntity", @"WHMS", @"dbo", "WithdrawRequest", 11 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "AccountantId", "AccountantId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "ContractorId", "ContractorId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "CreatedBy", "CreatedBy", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "CreatedOn", "CreatedOn", false, "DateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 3 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 4 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "IsApproved", "IsApproved", false, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 5 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "ProjectId", "ProjectId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 6 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "RequestDate", "RequestDate", false, "DateTime", 0, 0, 0, false, "", null, typeof(System.DateTime), 7 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "RequestNumber", "RequestNumber", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 8 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "Type", "Type", false, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 9 );
			this.AddElementFieldMapping( "WithdrawRequestEntity", "WithdrawalTypeId", "WithdrawalTypeId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 10 );
		}
		/// <summary>Inits WithdrawRequestItemEntity's mappings</summary>
		private void InitWithdrawRequestItemEntityMappings()
		{
			this.AddElementMapping( "WithdrawRequestItemEntity", @"WHMS", @"dbo", "WithdrawRequestItem", 7 );
			this.AddElementFieldMapping( "WithdrawRequestItemEntity", "ApprovedQuantity", "ApprovedQuantity", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 0 );
			this.AddElementFieldMapping( "WithdrawRequestItemEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "WithdrawRequestItemEntity", "ItemId", "ItemId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "WithdrawRequestItemEntity", "RequestedQuantity", "RequestedQuantity", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 3 );
			this.AddElementFieldMapping( "WithdrawRequestItemEntity", "RetrievedQuantity", "RetrievedQuantity", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 4 );
			this.AddElementFieldMapping( "WithdrawRequestItemEntity", "WithdawedQuantity", "WithdawedQuantity", false, "Decimal", 0, 5, 18, false, "", null, typeof(System.Decimal), 5 );
			this.AddElementFieldMapping( "WithdrawRequestItemEntity", "WithdrawRequestId", "WithdrawRequestId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 6 );
		}
		/// <summary>Inits WithdrawTransactionEntity's mappings</summary>
		private void InitWithdrawTransactionEntityMappings()
		{
			this.AddElementMapping( "WithdrawTransactionEntity", @"WHMS", @"dbo", "WithdrawTransaction", 10 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "AccountantId", "AccountantId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "ContractorId", "ContractorId", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 1 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 2 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "IsPriced", "IsPriced", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 3 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "Recipient", "Recipient", false, "NVarChar", 50, 0, 0, false, "", null, typeof(System.String), 4 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "TransactionId", "TransactionId", false, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 5 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "TransactionStatus", "TransactionStatus", true, "SmallInt", 0, 0, 5, false, "", null, typeof(System.Int16), 6 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "Type", "Type", false, "NVarChar", 10, 0, 0, false, "", null, typeof(System.String), 7 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "UseOtherProjects", "UseOtherProjects", true, "Bit", 0, 0, 0, false, "", null, typeof(System.Boolean), 8 );
			this.AddElementFieldMapping( "WithdrawTransactionEntity", "Wrnumber", "WRNumber", false, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 9 );
		}
		/// <summary>Inits WithdrawzPartyEntity's mappings</summary>
		private void InitWithdrawzPartyEntityMappings()
		{
			this.AddElementMapping( "WithdrawzPartyEntity", @"WHMS", @"dbo", "WithdrawzParty", 3 );
			this.AddElementFieldMapping( "WithdrawzPartyEntity", "Id", "Id", false, "Int", 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "WithdrawzPartyEntity", "Name", "Name", true, "NVarChar", 20, 0, 0, false, "", null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "WithdrawzPartyEntity", "Order", "Order", true, "Int", 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
		}

		/// <summary>Inits View's mappings</summary>
		private void InitItemViewTypedViewMappings()
		{
			this.AddElementMapping( "ItemViewTypedView", @"WHMS", @"dbo", "ItemView", 4 );
			this.AddElementFieldMapping( "ItemViewTypedView", "Id", "Id", false, "Int", 0, 0, 10,false, string.Empty, null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "ItemViewTypedView", "NameCodeUnit", "NameCodeUnit", false, "NVarChar", 182, 0, 0,false, string.Empty, null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "ItemViewTypedView", "CodeNameUnit", "CodeNameUnit", false, "NVarChar", 183, 0, 0,false, string.Empty, null, typeof(System.String), 2 );
			this.AddElementFieldMapping( "ItemViewTypedView", "TypeId", "TypeId", false, "Int", 0, 0, 10,false, string.Empty, null, typeof(System.Int32), 3 );
		}
		/// <summary>Inits View's mappings</summary>
		private void InitLookupTypedViewMappings()
		{
			this.AddElementMapping( "LookupTypedView", @"WHMS", @"dbo", "Lookup", 4 );
			this.AddElementFieldMapping( "LookupTypedView", "Id", "Id", false, "Int", 0, 0, 10,false, string.Empty, null, typeof(System.Int32), 0 );
			this.AddElementFieldMapping( "LookupTypedView", "Name", "Name", false, "NVarChar", 53, 0, 0,false, string.Empty, null, typeof(System.String), 1 );
			this.AddElementFieldMapping( "LookupTypedView", "Order", "Order", false, "SmallInt", 0, 0, 5,false, string.Empty, null, typeof(System.Int16), 2 );
			this.AddElementFieldMapping( "LookupTypedView", "Type", "type", false, "VarChar", 2, 0, 0,false, string.Empty, null, typeof(System.String), 3 );
		}
	}
}